CREATE TABLE [dbo].[SiteUser_AccessRole]
(
[RoleId] [int] NOT NULL,
[UserId] [int] NOT NULL,
[CreateDate] [datetime] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SiteUser_AccessRole] ADD CONSTRAINT [PK_SiteUserRole] PRIMARY KEY CLUSTERED  ([RoleId], [UserId]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SiteUser_AccessRole] ADD CONSTRAINT [FK_SiteUserRole_Roles] FOREIGN KEY ([RoleId]) REFERENCES [dbo].[AccessRole] ([RoleId])
GO
ALTER TABLE [dbo].[SiteUser_AccessRole] ADD CONSTRAINT [FK_SiteUserRole_Users] FOREIGN KEY ([UserId]) REFERENCES [dbo].[SiteUser] ([UserId])
GO
